//
//  qqTableViewCell.m
//  EasyToTesco
//
//  Created by ym on 16/3/27.
//  Copyright © 2016年 Jack. All rights reserved.
//

#import "qqTableViewCell.h"

@implementation qqTableViewCell

#define WIDTH [[UIScreen mainScreen] bounds].size.width
#define NORMWIDTH [[UIScreen mainScreen] bounds].size.width / 375
#define HEIGHT [[UIScreen mainScreen] bounds].size.height
#define NORMHEIGHT [[UIScreen mainScreen] bounds].size.height / 667
#define FRAME [[UIScreen mainScreen] bounds]



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
//        self.image  = [[UIImageView alloc] init];
//        [self.contentView addSubview:self.image];
//        //  self.cover_s.backgroundColor = COLOUR;
//        
//        self.label = [[UILabel alloc] init];
//        [self.contentView addSubview:self.label];
//        // self.name.backgroundColor = [UIColor redColor];
        
        
        self.image = [[UIImageView alloc ] init];
        [self.contentView addSubview:self.image];
        self.image.image = [UIImage imageNamed:@"location-gray-icon"];
                self.Name = [[UILabel alloc] init];
                [self.contentView addSubview:self.Name];
                // self.name.backgroundColor = [UIColor redColor];
  //      self.Name.backgroundColor = [UIColor redColor];
        self.Name.font = [UIFont systemFontOfSize:25];
        self.PhoneNum = [[UILabel alloc] init];
        [self.contentView addSubview:self.PhoneNum];
   //      self.PhoneNum.backgroundColor = [UIColor blueColor];
        self.Address = [[UILabel alloc] init];
        [self.contentView addSubview:self.Address];
        self.Address.numberOfLines  = 2;
   //     self.Address.backgroundColor = [UIColor blackColor];
        
    }
    
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
//    self.label.frame = CGRectMake(100*NORMWIDTH, 14*NORMHEIGHT, 100*NORMWIDTH, 30*NORMHEIGHT);
//    self.image.frame = CGRectMake(20, 5, 60*NORMWIDTH, self.contentView.frame.size.height - 10
//                                  );
    self.image.frame = CGRectMake(5, self.contentView.frame.size.height / 2  - 12*NORMHEIGHT, 25*NORMHEIGHT,25*NORMHEIGHT );
    self.Name.frame = CGRectMake(50*NORMWIDTH, 5, 100*NORMWIDTH, 40*NORMHEIGHT);
    
    
    self.Address.frame = CGRectMake(self.Name.frame.origin.x, self.contentView.frame.size.height - self.Name.frame.size.height  -20*NORMHEIGHT, 300*NORMWIDTH, 50*NORMHEIGHT);
    
        self.PhoneNum.frame = CGRectMake(150*NORMWIDTH+self.Name.frame.origin.x, 5, 150*NORMWIDTH, 40*NORMHEIGHT);
    
    
    
}





- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
